<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>CSS 动画 - 速度曲线</title>
 <style>
    body {
      padding: 0 40px 40px;
      color: #333;
    }

    img {
      width: 480px;
    }

    .box {
      width: 100%;
      height: 320px;
      padding: 0 10px;
      margin-top: 20px;
      border: 1px solid #ccc;
      box-shadow: 3px 3px 5px #ccc;
    }

    .box .item {
      width: 0;
      height: 30px;
      line-height: 30px;
      margin-top: 20px;
      background-color: green;
      color: #fff;
      padding-left: 10px;
      box-sizing: border-box;
    }

    .box .item:first-child {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: linear;
    }

    .box .item:nth-child(2) {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: ease;
    }

    .box .item:nth-child(3) {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: ease-in;
    }

    .box .item:nth-child(4) {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: ease-out;
    }

    .box .item:nth-child(5) {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: ease-in-out;
    }

    .box .item:last-child {
      animation-name: move;
      animation-duration: 5s;
      animation-fill-mode: forwards;
      animation-timing-function: steps(5);
    }

    @keyframes move {
      from {
        width: 0;
      }

      to {
        width: 100%;
      }
    }
  </style>
</head>
<body>
  <h3>速度曲线</h3>
  <p>设置动画执行过程中的速度变化曲线。</p>

  <img src="./images/timing-function.png" alt="">

  <div class="box">
    <div class="item">linear</div>
    <div class="item">ease</div>
    <div class="item">ease-in</div>
    <div class="item">ease-out</div>
    <div class="item">ease-in-out</div>
    <div class="item">steps(5)</div>
  </div>
</body>
</html>